package sumcorrect;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner s = new Scanner(new File("input.txt"));
        int summ = 0;
        while(s.hasNextInt()==true){
            summ+=s.nextInt();
        }
        FileWriter out = new FileWriter("output.txt");
        out.write(""+summ);
        out.close();
    }

}
